package cn.thoughtworks.school.programCenter.controllers;

import cn.thoughtworks.school.programCenter.services.DiffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/diff")
public class DiffController {

    @Autowired
    private DiffService diffService;

    @PostMapping("init")
    public ResponseEntity init() {
        diffService.initData();
        return new ResponseEntity(HttpStatus.CREATED);
    }
}
